﻿@{    
    ViewBag.Title = "MobileFlow";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

    <script type="text/javascript">
        function sub()
        { 
            var AjaxURL = "/Recharge/MobileFlowRecharge";
            var userId = $('#userId').val();
            var rechargeTarget = $('#rechargeTarget').val();
            var rechargeAmount = $('#rechargeAmount').val();
            var orderNo = $('#orderNo').val();
            var mac = $('#mac').val();
            $.ajax({
                type: "get",
                dataType: "html",
                url: AjaxURL + '?userId=' + userId + '&rechargeTarget=' + rechargeTarget + '&rechargeAmount=' + rechargeAmount + '&orderNo=' + orderNo + '&mac=' + mac,
                data: $('#f').serialize(),
                success: function (result) {
                    if (result == 1) {
                        alert("充值成功！")
                    }
                    else {
                        alert("充值失败！")
                    }
                },
            });
        }
    </script>




<h2>流量包充值</h2>
<div>
    <form id="f">
        商户Id:<input type="text" name="userId" id="userId" />
        手机号:<input type="text" name="rechargeTarget" style="width: 300px;"id="rechargeTarget" />
        流量包的金额:<input type="text" name="rechargeAmount"  id="rechargeAmount" />
        订单号:<input name="orderNo"  id="orderNo" />
        MAC:<input name="mac"  id="mac" />
        <input type="button" onclick="sub()" value="提交" />
    </form>
</div>
